<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>妙客邦生态管理中心</title>
  <meta name="description" content="particles.js is a lightweight JavaScript library for creating particles.">
  <meta name="author" content="Vincent Garreau" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <link rel="stylesheet" media="screen" href="/static/login/css/style.css">
  <link rel="stylesheet" type="text/css" href="/static/login/css/reset.css"/>
</head>
<body>

<div id="particles-js">
	<form class="layui-form">
		<div class="login">
			<div class="login-top">
				妙客邦生态管理中心
			</div>
			<div class="login-center clearfix">
				<div class="login-center-img"><img src="/static/login/img/name.png"/></div>
				<div class="login-center-input">
					<input type="text" name="username" lay-verify="required" placeholder="请输入您的用户名" />
					<div class="login-center-input-text">用户名</div>
				</div>
			</div>
			<div class="login-center clearfix">
				<div class="login-center-img"><img src="/static/login/img/password.png"/></div>
				<div class="login-center-input">
					<input type="password" name="password" lay-verify="required" placeholder="请输入您的密码" />
					<div class="login-center-input-text">密码</div>
				</div>
			</div>
			<div class="login-button" lay-submit lay-filter="formLogin">
				登录
			</div>
		</div>
		<div class="sk-rotating-plane"></div>
	</form>	
</div>

<!-- scripts -->
<script src="/static/login/js/particles.min.js"></script>
<script src="/static/login/js/app.js"></script>
<script src="/static/layui/layui.js"></script>
<script>
//Demo
layui.use('form', function(){
   var form = layui.form,$ = layui.jquery;

   form.on('submit(formLogin)', function(data){

		$.post('/store/login/check',data.field,function(res){
			if(res.code == 1){
				location.href = '/store'
			}
			if(res.code ==0 ){
				layer.msg(res.msg,{icon:2});
			}
		});
	});
  

});
</script>
</body>
</html>